diff --color -Naur a/cc_toolchain_config.bzl b/cc_toolchain_config.bzl
--- a/cc_toolchain_config.bzl	2023-01-06 15:34:50.000000000 -0800
+++ b/cc_toolchain_config.bzl	2023-01-22 15:33:16.794758043 -0800
@@ -27,6 +27,7 @@
     "with_feature_set",
 )
 load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES")
+load(":toolchain_features.bzl", "pl_toolchain_pre_features", "PL_EXTRA_CC_CONFIG_ATTRS", "pl_toolchain_post_features", "pl_action_configs")
 
 def layering_check_features(compiler):
     if compiler != "clang":
@@ -147,7 +148,7 @@
         tool_path(name = name, path = path)
         for name, path in ctx.attr.tool_paths.items()
     ]
-    action_configs = []
+    action_configs = pl_action_configs(ctx)
 
     llvm_cov_action = action_config(
         action_name = ACTION_NAMES.llvm_cov,
@@ -168,6 +169,10 @@
         name = "supports_start_end_lib",
         enabled = True,
     )
+    default_opt_level_flags_feature = feature(
+        name = "default_opt_level_flags",
+        enabled = True,
+    )
 
     default_compile_flags_feature = feature(
         name = "default_compile_flags",
@@ -203,7 +208,7 @@
                         flags = ctx.attr.dbg_compile_flags,
                     ),
                 ] if ctx.attr.dbg_compile_flags else []),
-                with_features = [with_feature_set(features = ["dbg"])],
+                with_features = [with_feature_set(features = ["dbg", "default_opt_level_flags"])],
             ),
             flag_set(
                 actions = all_compile_actions,
@@ -212,7 +217,7 @@
                         flags = ctx.attr.opt_compile_flags,
                     ),
                 ] if ctx.attr.opt_compile_flags else []),
-                with_features = [with_feature_set(features = ["opt"])],
+                with_features = [with_feature_set(features = ["opt", "default_opt_level_flags"])],
             ),
             flag_set(
                 actions = all_cpp_compile_actions + [ACTION_NAMES.lto_backend],
@@ -244,7 +249,7 @@
                         flags = ctx.attr.opt_link_flags,
                     ),
                 ] if ctx.attr.opt_link_flags else []),
-                with_features = [with_feature_set(features = ["opt"])],
+                with_features = [with_feature_set(features = ["opt", "default_opt_level_flags"])],
             ),
         ],
     )
@@ -1255,6 +1260,7 @@
             strip_debug_symbols_feature,
             coverage_feature,
             supports_pic_feature,
+            default_opt_level_flags_feature,
         ] + (
             [
                 supports_start_end_lib_feature,
@@ -1276,6 +1282,7 @@
     else:
         features = [
             supports_pic_feature,
+            default_opt_level_flags_feature,
         ] + (
             [
                 supports_start_end_lib_feature,
@@ -1294,6 +1301,7 @@
             unfiltered_compile_flags_feature,
         ] + layering_check_features(ctx.attr.compiler)
 
+    features = pl_toolchain_pre_features(ctx) + features + pl_toolchain_post_features(ctx)
     return cc_common.create_cc_toolchain_config_info(
         ctx = ctx,
         features = features,
@@ -1313,7 +1321,7 @@
 
 cc_toolchain_config = rule(
     implementation = _impl,
-    attrs = {
+    attrs = dict({
         "cpu": attr.string(mandatory = True),
         "compiler": attr.string(mandatory = True),
         "toolchain_identifier": attr.string(mandatory = True),
@@ -1336,6 +1344,6 @@
         "coverage_link_flags": attr.string_list(),
         "supports_start_end_lib": attr.bool(),
         "builtin_sysroot": attr.string(),
-    },
+    }, **PL_EXTRA_CC_CONFIG_ATTRS),
     provides = [CcToolchainConfigInfo],
 )
